package com.yonyou.cyxdms.sysAuth.service.entity.notification;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import java.time.ZoneOffset;

import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;
import org.apache.poi.ss.formula.functions.T;

/**
 * <p>
 * 通知通告信息表
 * </p>
 *
 * @author adu
 * @since 2019-10-14
 */
@TableName("tt_notification")
public class NotificationPO extends DMSBasePO<NotificationPO> {

    private static final long serialVersionUID = 1L;

    /**
     * 通知ID
     */
    @TableId(value = "NOTIFICATION_ID", type = IdType.AUTO)
    private Long notificationId;

    /**
     * 通知主题
     */
    @TableField("NOTIFICATION_TITLE")
    private String notificationTitle;

    /**
     * 通告类型
     */
    @TableField("NOTIFICATION_TYPE")
    private Integer notificationType;

    /**
     * 通知正文
     */
    @TableField("NOTIFICATION_CONTENT")
    private String notificationContent;

    /**
     * 紧急程度
     */
    @TableField("URGENCY")
    private Integer urgency;

    /**
     * 通知通告有效开始时间
     */
    @TableField("START_TIME")
    private String startTime;

    /**
     * 通知通告有效结束时间
     */
    @TableField("END_TIME")
    private String endTime;

    /**
     * 是否全网发布
     */
    @TableField("IS_ALL")
    private Integer isAll;

    /**
     * 状态（已保存，已发布）
     */
    @TableField("STATUS")
    private Integer status;

    /**
     * 发布人
     */
    @TableField("PUBLISH_PERSON")
    private String publishPerson;

    /**
     * 发布部门ID
     */
    @TableField("PUBLISH_ORG_ID")
    private Long publishOrgId;

    /**
     * 发布时间
     */
    @TableField("PUBLISH_DATE")
    private String publishDate;

    /**
     * APP_ID
     */
    @TableField(value = "APP_ID")
    private String appId;

    /**
     * 公司代码
     */
    @TableField("COMPANY_CODE")
    private String companyCode;

    /**
     * 所有者代码
     */
    @TableField("OWNER_CODE")
    private String ownerCode;

    /**
     * 所有者的父组织代码（用于二网使用）
     */
    @TableField("OWNER_PAR_CODE")
    private String ownerParCode;

    /**
     * 组织ID
     */
    @TableField("ORG_ID")
    private Integer orgId;

    /**
     * 数据来源（厂家、经销商）
     */
    @TableField("DATA_TYPE")
    private Long dataType;

    @TableField("FILE_URL")
    private String fileUrl;

    @TableField("FILE_NAME")
    private String fileName;
    /**
     * 是否删除
     */
    @TableField("IS_DELETED")
    private Boolean isDeleted;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getFileName() {
        return fileName;
    }

    public NotificationPO() {
        super();
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public Long getNotificationId() {
        return notificationId;
    }

    public String getFileUrl() {
        return fileUrl;
    }

    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }

    public String getPublishPerson() {
        return publishPerson;
    }

    public void setPublishPerson(String publishPerson) {
        this.publishPerson = publishPerson;
    }

    public Long getDataType() {
        return dataType;
    }

    public void setDataType(Long dataType) {
        this.dataType = dataType;
    }

    public void setNotificationId(Long notificationId) {
        this.notificationId = notificationId;
    }

    public String getNotificationTitle() {
        return notificationTitle;
    }

    public void setNotificationTitle(String notificationTitle) {
        this.notificationTitle = notificationTitle;
    }

    public Integer getNotificationType() {
        return notificationType;
    }

    public void setNotificationType(Integer notificationType) {
        this.notificationType = notificationType;
    }

    public String getNotificationContent() {
        return notificationContent;
    }

    public void setNotificationContent(String notificationContent) {
        this.notificationContent = notificationContent;
    }

    public Integer getUrgency() {
        return urgency;
    }

    public void setUrgency(Integer urgency) {
        this.urgency = urgency;
    }

    public Integer getOrgId() {
        return orgId;
    }

    public void setOrgId(Integer orgId) {
        this.orgId = orgId;
    }

    public Integer getIsAll() {
        return isAll;
    }

    public void setIsAll(Integer isAll) {
        this.isAll = isAll;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }



    public Long getPublishOrgId() {
        return publishOrgId;
    }

    public void setPublishOrgId(Long publishOrgId) {
        this.publishOrgId = publishOrgId;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getPublishDate() {
        return publishDate;
    }

    public void setPublishDate(String publishDate) {
        this.publishDate = publishDate;
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public String getOwnerCode() {
        return ownerCode;
    }

    public void setOwnerCode(String ownerCode) {
        this.ownerCode = ownerCode;
    }

    public String getOwnerParCode() {
        return ownerParCode;
    }

    public void setOwnerParCode(String ownerParCode) {
        this.ownerParCode = ownerParCode;
    }


    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    protected Serializable pkVal() {
        return this.notificationId;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    @Override
    public String toString() {
        return "NotificationPO{" +
                "notificationId=" + notificationId +
                ", notificationTitle='" + notificationTitle + '\'' +
                ", notificationType=" + notificationType +
                ", notificationContent='" + notificationContent + '\'' +
                ", urgency=" + urgency +
                ", startTime='" + startTime + '\'' +
                ", endTime='" + endTime + '\'' +
                ", isAll=" + isAll +
                ", status=" + status +
                ", publishPerson='" + publishPerson + '\'' +
                ", publishOrgId=" + publishOrgId +
                ", publishDate='" + publishDate + '\'' +
                ", appId='" + appId + '\'' +
                ", companyCode='" + companyCode + '\'' +
                ", ownerCode='" + ownerCode + '\'' +
                ", ownerParCode='" + ownerParCode + '\'' +
                ", orgId=" + orgId +
                ", dataType=" + dataType +
                ", fileUrl='" + fileUrl + '\'' +
                ", fileName='" + fileName + '\'' +
                ", isDeleted=" + isDeleted +
                '}';
    }

    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author chengliang
     * @since 2019-09-11
     */
    public <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "notificationId");
    }

    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author chengliang
     * @since 2019-09-11
     */
    public <T extends BaseDTO> void transPoToDto(T dto) {
        BeanMapperUtil.copyProperties(this, dto);
    }


}
